package UserUI;

import courseManageUI.SchCourseInfoFrame;
import loginUI.LoginFrame;
import userManageUI.ChangePassWordFrame;
import userManageUI.SchUserInfoFrame;
import frameUI.BuildFrame;
import frameUI.ModifyFrame;
import frameUI.ShowFrame;
import frameUI.ShowPlanFrame;
import VO.UserVO;

public class SchAdmController {

	private static UserVO userVO;
	private static SchAdminFrame schAdminFrame;
	private static SchCourseInfoFrame courseInfoFrame;
	private static BuildFrame buildFrame;
	private static ModifyFrame modifyFrame;
	private static SchUserInfoFrame userInfoFrame;
	private static ChangePassWordFrame changePassWordFrame;
	private static ShowFrame showFrame;
	private static ShowPlanFrame planFrame;
	
	public SchAdmController(UserVO userVO){
		this.userVO=userVO;
		schAdminFrame = new SchAdminFrame(this.userVO);
		buildFrame = new BuildFrame(this.userVO);
		userInfoFrame = new SchUserInfoFrame(this.userVO);
		changePassWordFrame = new ChangePassWordFrame(this.userVO);
		planFrame = new ShowPlanFrame(this.userVO);
		
	}
	public SchAdmController(){
		
	}
	
	

	public static void jumpTo(String frame){
		switch(frame){
		case"login":
			new LoginFrame().setVisible(true);break;
		case"main":
			schAdminFrame.setVisible(true);break;
		
		case"courseInfoFrame":
			courseInfoFrame = new SchCourseInfoFrame(userVO); 
			courseInfoFrame.setVisible(true);break;
		case"userInfoFrame":
			userInfoFrame.setVisible(true);break;
		case"changePassWordFrame":
			changePassWordFrame.setVisible(true);break;
		case"modifyFrame":
			modifyFrame = new ModifyFrame(userVO);
			modifyFrame.setVisible(true);break;
		case"buildFrame":
			buildFrame.setVisible(true);break;
		case"showFrame":
			showFrame = new ShowFrame(userVO);
			showFrame.setVisible(true);break;
		case"planFrame":
			planFrame.setVisible(true);break;
		}
	}
}
